import { Component } from 'react';
import { Navbar,Button,Icon, } from '@blueprintjs/core';
import { loginOut } from '../../../../api/sign';

export default class UserDropdown extends Component {
    constructor(props) {
        super(props);
		this.state = {
			
		}
		this.logOut = this.logOut.bind(this);
    }
	
	logOut() {
		loginOut();
	}

    render() {
        if(this.props.drop) {
        	return (
        		<ul className="bp3-menu .modifier bp3-elevation-1 user-drop">
        			<li>
        				<a className="bp3-menu-item bp3-icon-people" tabIndex="0">修改信息</a>
        			</li>
        			<li>
        				<a onClick={this.logOut} className="bp3-menu-item bp3-icon-circle-arrow-right" tabIndex="0">注销用户</a>
        			</li>
        		</ul>
        	);
        } else {
        	return null
        }
    }
}